import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/mapArea',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/mapArea/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/mapArea',
    method: 'put',
    data
  })
}

export function findAll(mineMapId) {
  return request({
    url: 'api/mapArea?page=0&size=99999&mineMapId=' + mineMapId
  })
}

export function getName(name) {
  return request({
    url: 'http://localhost:8013/api/mapArea?page=0&size=10&sort=id%2Cdesc&name=' + name
  })
}

export default { add, edit, del, findAll }
